<script setup></script>
<template>
  <div class="home">
    <div class="button-container">
      <button class="system-button" @click="$router.push('/internal')">
        <div class="button-text-wrapper">
          <span class="button-text-zh">内部系统</span>
          <span class="button-text-en">Internal System</span>
        </div>
      </button>
      <button class="system-button" @click="$router.push('/external')">
        <div class="button-text-wrapper">
          <span class="button-text-zh">外部系统</span>
          <span class="button-text-en">External System</span>
        </div>
      </button>
    </div>
  </div>
</template>
<style lang="scss" scoped>
.home {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.button-container {
  display: flex;
  gap: 240px;
  z-index: 10;
}

.system-button {
  position: relative;
  width: 240px;
  height: 240px;
  background: linear-gradient(135deg, #1792f5d8 0%, #0d6bc9 100%);
  border: none;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: all 0.3s ease;
  clip-path: polygon(
    30% 0%,
    70% 0%,
    100% 30%,
    100% 70%,
    70% 100%,
    30% 100%,
    0% 70%,
    0% 30%
  );
  filter: drop-shadow(0 10px 30px rgba(23, 146, 245, 0.8))
    drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5))
    drop-shadow(0 0 20px rgba(23, 146, 245, 0.6));

  &::after {
    content: "";
    position: absolute;
    inset: 3px;
    background: linear-gradient(135deg, #1792f5d8 0%, #0d6bc9 100%);
    clip-path: polygon(
      30% 0%,
      70% 0%,
      100% 30%,
      100% 70%,
      70% 100%,
      30% 100%,
      0% 70%,
      0% 30%
    );
    z-index: -1;
  }

  &::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      90deg,
      transparent,
      rgba(255, 255, 255, 0.3),
      transparent
    );
    clip-path: polygon(
      30% 0%,
      70% 0%,
      100% 30%,
      100% 70%,
      70% 100%,
      30% 100%,
      0% 70%,
      0% 30%
    );
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
  }

  &:hover {
    transform: translateY(-4px) scale(1.05);
    filter: drop-shadow(0 15px 40px rgba(23, 146, 245, 1))
      drop-shadow(0 8px 20px rgba(0, 0, 0, 0.6))
      drop-shadow(0 0 30px rgba(23, 146, 245, 0.8)) brightness(1.15);

    &::before {
      opacity: 1;
    }
  }

  &:active {
    transform: translateY(-2px) scale(1.02);
  }

  .button-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    z-index: 2;
  }

  .button-text-zh {
    font-size: 26px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 12px rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
  }

  .button-text-en {
    font-size: 13px;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    opacity: 0.9;
    text-transform: uppercase;
  }
}
</style>
